package com.atguigu.jvm1205;

/**
 * @author gcq
 * @Create 2020-12-01
 */
public class MyObject {
    public static void main(String[] args) {
        Object object = new Object();
//        System.out.println(object.getClass().getClassLoader().getParent());
        System.out.println(object.getClass().getClassLoader());

        System.out.println();
        System.out.println();
        System.out.println();

        MyObject myObject = new MyObject();
        System.out.println(myObject.getClass().getClassLoader().getParent().getParent()); // 启动类加载器 BootstrapClass
        System.out.println(myObject.getClass().getClassLoader().getParent()); // 扩展类加载器 Extension
        System.out.println(myObject.getClass().getClassLoader()); // 应用程序加载器 AppClassLoader
    }
}